package com.swq.java.code.chapter16.code04;

public class LimitBag<T extends Number> {
    private T content;

    public LimitBag(T content) {
        this.content = content;
    }

    public T get() {
        return this.content;
    }

    public void set(T content) {
        this.content = content;
    }

    public static void main(String[] args) {
        //LimitBag<List> bag1=new LimitBag<List>(new ArrayList());//编译出错
        LimitBag<Integer> bag2 = new LimitBag<Integer>(12);
    }
}